import { reactive } from "vue";
export const useColumns = () => {
  // 表格列的配置
  const columns = reactive([
    {
      title: "用户名",
      dataIndex: "username",
      key: "username",
    },
    {
      title: "手机号",
      dataIndex: "mobile",
      key: "mobile",
    },
    {
      title: "邮箱",
      dataIndex: "email",
      key: "email",
    },
    {
      title: "角色",
      key: "role_id",
      slots: { customRender: "role_id" },
    },
    {
      title: "权限",
      key: "status",
      slots: { customRender: "status" },
    },
    {
      title: "操作",
      key: "operation",
      slots: { customRender: "operation" },
    },
  ]);

  return {
    columns,
  };
};
